import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class test{
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String input;
        while((input=br.readLine()) != null){
            int number = Integer.parseInt(input);
            String binary = Integer.toBinaryString(number);
            String[] string = binary.split("0");

            int num=0;
            for(String str : string)
                num = Math.max(num,str.length());

            System.out.println(num);
        }
    }
}
